package netty.buffer;

import java.nio.ByteBuffer;

/**
 * @author cyt
 * @create 2020-11-04 14:34
 */
public class TestA {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(1024);
        buffer.putChar('A');
        buffer.putFloat(1.22F);
        buffer.putInt(2);

        buffer.flip();

        System.out.println(buffer.getInt());
        System.out.println(buffer.getFloat());
        System.out.println(buffer.getChar());
    }
}
